package org.mashart.pink.m.gps;

/**
 * Main interface for GPS data collection
 * Should be implemented by every class that handles GPS data gathering,
 * e.g. a built-in GPS device class
 *
 * Used by <code>Receiver</code>
 */
public interface DeviceConnector {
    
    /**
     * Called when settings are changed or right after
     * implementing class instantiation.
     *
     * Cannot be called after <code>initialize()</code>
     */
    public int configure();

    /**
     * Establishes connection with (via Bluetooth) or "turns on" a built-in
     * GPS device
     */
    public int initialize();

    /**
     * Activate
     */
    public int activate();

    /**
     * Deactivate
     */
    public int deactivate();

    /**
     * Returns a waypoint if the connector is ready, otherwise return null.
     */
    public Waypoint getWaypoint();

    /**
     * Closes any stablished BT connections and/or "turns off" built-in
     * GPS device
     */
    public int terminate();
}
